CC = g++
LD = g++
prog = libcore.so
SRC = \
	null_deleter.h \
	timeout.cpp \
	timeout.h
OBJ = \
	timeout.o 

LDFLAGS = -shared -lpthread
CFLAGS = -std=c99 -g -fPIC -DPIC -fvar-tracking  

all: $(prog)

${prog}: $(OBJ)
	$(LD) $(LDFLAGS) $(OBJ) -o $(prog)

%.o: %.cpp
	$(CC) $(CFLAGS) -c $< -o $@

%.o: %.c
	$(CC) $(CFLAGS) -c $< -o $@

clean:
	rm $(OBJ)
	rm $(prog)

run:
	./$(prog)
